#include "my_string.h"
using std::cout;
using std::endl;
using std::cin;


void test(){
    String s1;
    String s2("hello");
    cout<<"s2: "<<s2<<endl;
    
    String s3 = "world";
    cout<<"s3: "<<s3<<endl;
    
    String s4 = s2;//hello
    cout<<"s4: "<<s4<<endl;

    String s5 = s2+s3;//helloworld
    cout<<"s5: "<<s5<<endl;
    
    s4+=s3;
    cout<<"s4+=s3: "<<s4<<endl;//helloworld

    s2+="world";
    cout<<"s2+= \"world\""<<s2<<endl;//helloworld

    cout<<"s2==s4? "<<(s2==s4)<<endl;
    cout<<"s4!=s3? "<<(s4!=s3)<<endl;
    
    cout<<"s3<s2? "<<(s3<s2)<<endl;
    cout<<"s3>s2? "<<(s3>s2)<<endl;
    cout<<"s3<=s2? "<<(s3<=s2)<<endl;
    cout<<"s4>=s2? "<<(s4>=s2)<<endl;


    cout<<"请输入字符串"<<endl;
    cin>>s1;
    cout<<"s1: "<<s1<<endl;

}

int main()
{
    

    test ();
    return 0;
}

